<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="www.thymeleaf.org"
	  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	  layout:decorator="layouts/default">
<head>
<meta charset="UTF-8" />
<title>SEARCH ADMIN</title>
<link rel="stylesheet" href="../../css/bootstrap/bootstrap.css"
	th:href="@{/css/bootstrap/bootstrap.css}" />
<script src="../../js/jquery-1.11.2.js" th:src="@{/js/jquery-1.11.2.js}"></script>
<script src="../../js/admin.js" th:src="@{/js/admin.js}"></script>
<style>
@font-face {
	font-family: 'Glyphicons Halflings';
	src: url('../fonts/glyphicons-halflings-regular.eot');
	src: url('../fonts/glyphicons-halflings-regular.eot?#iefix')
		format('embedded-opentype'),
		url('../fonts/glyphicons-halflings-regular.woff') format('woff'),
		url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),
		url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular')
		format('svg');
}
</style>
</head>
<body>
	<header></header>
	<nav class="navbar navbar-inverse">
		<div class="container-fluid">
			<div class="col-md-offset-1">
				<ul class="nav navbar-nav">
					<li><a><span></span>HOME</a></li>
					<li><a href="#"><span></span>RESTAURANT</a></li>
					<li><a th:href="@{/admin/list}"><span></span>ADMIN</a></li>
					<li><a href="#"><span></span>ORDER</a></li>
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li><a href="#"><span class="glyphicon glyphicon-search"></span>Sign
							Up</a></li>
					<li><a th:href="@{/j_spring_security_logout}"><span
							class="glyphicon glyphicon-log-out"></span>Logout</a></li>
				</ul>
			</div>
		</div>
	</nav>
	<section>
		<article class="container col-sm-10 col-sm-offset-1">
			<ol class="breadcrumb">
				<li><a th:href="@{/adminaccount/home}">Home</a></li>
				<li><a th:href="@{/restaurant/list}">Admin</a></li>
				<li class="active">Search</li>
			</ol>
			<div class="panel panel-success">
				<div class="panel-heading">ADMIN MANAGEMENT</div>
				<div class="panel-body">
					<form method="post" th:action="@{/admin/search}"
						class="form-horizontal container col-sm-10 col-sm-offset-1">
						<div class="form-group">
							<label class="control-label col-sm-3" for="adminName">Admin
								Name:</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="adminName"
									name="adminName" placeholder="Enter admin name" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="adminEmail">Admin
								Email:</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="adminEmail"
									name="adminEmail" placeholder="Enter admin email" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="phoneNumber">Phone Number</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="phoneNumber" name="phoneNumber"
								 placeHolder="Enter phone number"/>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="adminLoginId">User Name</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="adminLoginId" name="adminLoginId"
								 placeHolder="Enter username"/>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="adminGender">Gender</label>
							<div class="col-sm-3">
								<select class="form-control">
									<option value="-1">--Gender--</option>
									<option value="0">Male</option>
									<option value="1">Female</option>
								</select>
							</div>
							<label class="control-label col-sm-3" for="cityId">City</label>
							<div class="col-sm-3">
								<select id="city" name="city" class="form-control" onchange="getDistrict();">
									<option value="0">--City--</option>
									<option th:each="ct : ${city.entrySet()}" th:value="${ct.key}" th:text="${ct.value}"></option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="roleId">Role</label>
							<div class="col-sm-3">
								<select id="role" name="role" class="form-control">
									<option value="-1">--Role--</option>
									<option th:each="ro : ${role.entrySet()}" th:value="${ro.key}" th:text="${ro.value}"></option>
								</select>
							</div>
							<label class="control-label col-sm-3" for="district">District</label>
							<div class="col-sm-3">
								<select id="district" name="district" class="form-control">
									<option value="0">--District--</option>
									
								</select>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-3 col-sm-3">
								<button type="submit"
									class="btn btn-primary glyphicon glyphicon-search">Search</button>
							</div>
							<div class="sm-offset-3 col-sm-3 pull-right">
								<a th:href="@{/admin/form}"><button type="button"
										class="btn btn-primary glyphicon glyphicon-new-window">Add</button></a>
							</div>
						</div>
					</form>
					<div th:unless="${#lists.isEmpty(list)}">
						<table class="table table-hover">
							<thead>
								<tr>
									<th>Admin Name</th>
									<th>Email</th>
									<th>Username</th>
									<th>Gender</th>
									<th>Phone Number</th>
									<th>City</th>
									<th>District</th>
									<th>Role</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="admin : ${list}">
									<td><a th:href="@{/admin/detail(adminLoginId=${admin.adminLoginId})}"
										th:text="${admin.adminName}"></a></td>
									<td th:text="${admin.adminEmail}"></td>
									<td th:text="${admin.adminLoginId}"></td>
									<td th:text="${admin.adminGender}"></td>
									<td th:text="${admin.phoneNumber}"></td>
									<td th:text="${admin.cityName}"></td>
									<td th:text="${admin.districtName}"></td>
									<td th:text="${admin.roleName}"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="panel-footer"></div>
			</div>
		</article>
	</section>
	<!--  <footer class="container col-sm-12">
		<ol class="breadcrumb text-center">
			<li class="active"><p>@copyright - University Of Information
					Technology - Spring + hibernate + css3 + html5</p></li>
		</ol>
	</footer>
	
	  <div th:include="layouts/footer :: copy"></div> -->
		
</body>
</html>